<%--
  Created by IntelliJ IDEA.
  User: Tian
  Date: 2024/7/1
  Time: 21:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<el-menu router :default-active="$route.path" class="el-menu-vertical-demo" @open="handleOpen"
         @close="handleClose" style="text-align:left" active-text-color="#0071DB" :router="true"
         background-color="#fff" text-color="#000" :unique-opened="true">
  <div v-for="(item,index) in asideArr" :key="index">
    <!-- 一级菜单（没有子级菜单）-->
    <el-menu-item :index="item.path" v-if="!item.children">{{item.title}}</el-menu-item>
    <!-- 一级菜单（有子菜单）-->
    <el-submenu :index="item.path" v-else>
      <template slot="title">{{item.title}}</template>
      <!-- 遍历二级菜单 -->
      <div v-for="(i,index) in item.children" :key="index">
        <!-- 二级菜单（没有三级菜单）-->
        <el-menu-item :index="i.path" v-if="!i.children">{{i.title}}</el-menu-item>
        <!-- 二级菜单（有三级菜单）-->
        <el-submenu :index="i.path" v-if="i.children">
          <template slot="title">{{i.title}}</template>
          <el-menu-item :index="j.path" v-for="(j,index) in i.children" :key="index">{{j.title}}</el-menu-item>
        </el-submenu>
      </div>
    </el-submenu>
  </div>
</el-menu>
</body>
</html>
